<!DOCTYPE HTML>
<html>
<head>
	<meta charset="utf-8">
	<title>约泡浪呀榜</title>
	<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<meta name="format-detection" content="telephone=no" />
	<meta name="format-detection" content="email=no" />
	<meta name="apple-mobile-web-app-title" content="">
	<meta name="description" content="" />
	<meta name="keywords" content="" />
</head>

<body class="app">
<script src="src/js/zepto.min.js"></script>
<script>
	Zepto(function($){

		var isWeixin = function() {
			var ua = navigator.userAgent.toLowerCase();
			if (ua.match(/MicroMessenger/i) == 'micromessenger') {
				return true;
			} else {
				return false;
			}
		};

		var getParam = function(name){
			var search = document.location.search;
			var pattern = new RegExp("[?&]"+name+"\=([^&]+)", "g");
			var matcher = pattern.exec(search);
			var items = null;
			if(null != matcher){
				try{
					items = decodeURIComponent(decodeURIComponent(matcher[1]));
				}catch(e){
					try{
						items = decodeURIComponent(matcher[1]);
					}catch(e){
						items = matcher[1];
					}
				}
			}
			return items;
		};

		var nickname = getParam('nickname') || localStorage.getItem('ydz_langyabang_nickname');

		if (nickname && nickname.length) {
			localStorage.setItem('ydz_langyabang_nickname', nickname);
			window.location = 'http://m.yidaozou.com/html/langyabang/app.html';
		}

		if (isWeixin()) {
			window.location =
					'http://api.one-dao.com/api/wechat/getAuthorizeUrl?successUrl=' +
					encodeURIComponent('http://m.yidaozou.com/html/langyabang/jump.html');
		} else {
			window.location = 'http://m.yidaozou.com/html/langyabang/app.html';
		}

	})
</script>

</body>

</html>
